const http=require('http');
const url=require('url');
const util=require('util');

http.createServer((request,response)=>{
    response.writeHead(200,{'Content-Type':'text/plain; charset=utf-8'});
    let info=url.parse(request.url,true);
    response.write(`${JSON.stringify(info.query)}\n`);
    response.end(util.inspect(info));
}).listen(8080);
console.log('Server running at http://127.0.0.1:8080');
